home *** CD-ROM | disk | FTP | other *** search
/ CGI How-To / CGI HOW-TO.iso / chap8 / 8_1 / get_info.cgi next >
Encoding:
Text File  |  1996-06-15  |  1.1 KB  |  34 lines

  1. #!/usr/local/bin/perl
  2.  
  3. # The above line explains where your perl program is.  You'll need to
  4. # change it to reflect the location of your program on your system.  
  5. # If you don't know where it is, type "which perl" or "whereis perl" 
  6. # at the command line and substitute the resulting path for the path 
  7. # above.
  8.  
  9. unshift (@INC, "/usr/local/etc/httpd/cgi-bin/Library");
  10.  
  11. require "cgi-lib.pl";
  12. &ReadParse(*MYDATA);
  13.  
  14. $customer_service_email = "selena\@eff.org";
  15. $mail_program = "mail";
  16. $get_info_who = "./register.temp";
  17.  
  18. open (NOTE, ">$get_info_who") || die "Could not open the file";
  19.  
  20. print NOTE "Someone has been perusing the Computer Outlet!\n\n";
  21. print NOTE "    Name:    $MYDATA{'name'}\n";
  22. print NOTE "    Phone:   $MYDATA{'phone'} \n";
  23. print NOTE "    E-Mail:  $MYDATA{'email'} \n";
  24. print NOTE "    Referring Distributor:  $MYDATA{'referrer'} \n";
  25.  
  26. close (NOTE);
  27. system ("$mail_program -s Registration  $customer_service_email < $get_info_who");
  28.  
  29. print "Content-type: text/html\n\n";
  30. print "<HTML><HEAD><TITLE>Feedback Response</TITLE></HEAD><BODY> \n";
  31. print "<H1><CENTER>Thanks for your feedback.</H1></CENTER>\n";
  32. print "</BODY></HTML>";
  33.  
  34.